package cz.idsv.web.mvc.model.dao;

import java.util.Collection;

import org.springframework.dao.DataAccessException;

import cz.idsv.web.mvc.model.entity.PersonEntity;

/**
 * Person DAO interface.
 * 
 * @author Jan Borzensky
 */
public interface PersonDao {

    /**
     * Find persons.
     */
    public Collection<PersonEntity> findPersons() throws DataAccessException;
    
    /**
     * Saves person.
     */
    public void save(PersonEntity personEntity);
    
    
    /**
     * Delete person.
     */
    public void delete(PersonEntity personEntity);
    
    /**
     * Find person by id.
     */
    public PersonEntity findPersonById(Integer id) throws DataAccessException;
    
    /**
     * Find person by name.
     */
    public Collection<PersonEntity> findPersonByName(String name) throws DataAccessException;
    
    /**
     * Find person by city.
     */
    public Collection<PersonEntity> findPersonByCity(String cityName) throws DataAccessException;
    /**
     * Find person by street.
     */
    public Collection<PersonEntity> findPersonByStreet(String streetName) throws DataAccessException;
}

